﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Utils
{
    public class Key
    {
        public Tuple<string,string> GenKey()
        {
            var keygen = new SshKeyGenerator.SshKeyGenerator(2048);

            var privateKey = keygen.ToPrivateKey();
            Console.WriteLine(privateKey);

            var publicSshKey = keygen.ToRfcPublicKey();
            Console.WriteLine(publicSshKey);

            var publicSshKeyWithComment = keygen.ToRfcPublicKey("user@example.com");
            Tuple<string, string> tup = new Tuple<string, string>(publicSshKeyWithComment, privateKey);
            Console.WriteLine(publicSshKeyWithComment);
            return tup;
        }
    }
}
